package com.whfc.common.enums;

/**
 * @Description: 闸机识别模式
 */
public enum RecMode {

    FACE(1, "人脸识别"),

    CARD(2, "刷卡"),

    FACE_CARD(3, "双重认证"),

    CHECK(4, "人证对比"),

    FINGERPRINT(5, "指纹");

    private Integer value;

    private String desc;

    RecMode(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static RecMode parseValue(Integer value) {
        if (value == null) {
            return FACE;
        }
        switch (value) {
            case 1:
                return FACE;
            case 2:
                return CARD;
            case 3:
                return FACE_CARD;
            case 4:
                return CHECK;
            case 5:
                return FINGERPRINT;
            default:
                return FACE;
        }
    }
}
